import 'package:flutter/material.dart';
import 'package:flutter_hf/login/login_page.dart';

import '../login/set_user_info_page.dart';
import 'router_utils.dart';

class UnitRouter {
  static const String widget_detail = '/widget_detail';
  static const String login = 'login';
  static const String register = 'register';
  static const String set_user_info = '/set_user_info';

  static Route<dynamic> generateRoute(RouteSettings settings) {
    switch (settings.name) {
      case login:
        return Bottom2TopRouter(child: const LoginPage());
      case set_user_info:
        return Bottom2TopRouter(child: const SetUserInfoPage());
      default:
        return MaterialPageRoute(
            builder: (_) => Scaffold(
                  body: Center(
                    child: Text('No route defined for ${settings.name}'),
                  ),
                ));
    }
  }
}
